<form action="{:url()}" method="post" class="form_single">
   <div class="box">  
      <div class="box-body">
        <div class="row">

          <div class="col-md-6">
            <div class="form-group">
                <label>小屋所属行政区域</label>
                <span>（小屋所属行政区域）</span>
            {assign name="province" value="$info['county_id']|default='0'" /}
            {assign name="city" value="$info['town_id']|default='0'" /}
            {assign name="county" value="$info['room_id']|default='0'" /}
            {:widget('region/index', ['province' =>$province, 'city' =>$city,'county'=>$county,'name'=>'id'])}
            </div>
          </div>


          <div class="col-md-6">
            <div class="form-group">
              <label>小屋名称</label>
              <span>（健康小屋名称）</span>
              <input class="form-control" name="name" placeholder="请输入小屋名称" value="{$info['name']|default=''}" type="text">
            </div>
          </div>
            


          <div class="col-md-6">
            <div class="form-group">
              <label>选择屋主</label>
              <span>（请选择屋主信息）</span>
              <select name="owner_code" class="form-control" id='ocode'>
                    {volist name='expert_list' id='vo'}
                        <option value="{$vo.username}">{$vo.nickname}:{$vo.username} </option>
                    {/volist}
                </select>

            </div>
          </div>            
          
              <div class="col-md-6">
            <div class="form-group">
              <label>创建时间</label>
              <span>（填写小屋开始创建的时间）</span>
             <input class="form-control date" name="start_time" placeholder="请选择或输入日期" value="{$info['start_time']|default='2018-05-05'}" type="text">
            </div>
          </div>

          <div class="col-md-6">
            <div class="form-group">
                <label>联系电话</label>
                <span>（小屋联系电话）</span>
                <input class="form-control" name="telphone" placeholder="请输入小屋联系电话" value="{$info['telphone']|default=''}" type="text">
            </div>
          </div>
            
          <div class="col-md-6">
            <div class="form-group">
                <label>通信地址</label>
                <span>（请输入小屋通信地址）</span>
                <input class="form-control" name="address"  placeholder="请输入通信地址" value="{$info['address']|default=''}">
            </div>
          </div>
            
          <div class="col-md-6">
            <div class="form-group">
              <label>专家所属医院</label>
              <span class="">（专家所属医院代码）</span>
                <input class="form-control" name="hospital_id" value="{$hospital_id|default=''}" readonly="true">
            </div>
          </div>
            
            
          <div class="col-md-6">
            <div class="form-group">
              <label>请选择小屋专业类型</label>
              <select name="disease_type" class="form-control">
                    {volist name='disease_list' id='vo' key='k'}
                        <option value="{$k-1}" {notempty name="info['disease_type']"} {if condition="$info['disease_type'] eq $k"} selected="selected" {/if}{/notempty} >{$vo} </option>
                    {/volist}
                </select>

            </div>
          </div>
                    <div class="col-md-6 hidden">
            <div class="form-group">
              <label>小屋编号</label>
              <span>（填写邯郸市卫生健康委员会为小屋分配的标准编号）</span>
              <input class="form-control" name="room_id" placeholder="请输入小屋编号" value="{$info['room_id']|default=''}" type="text" readonly="true">
            </div>
          </div>
            
          </div>
        </div>
        
      <div class="box-footer">
          
        <input type="hidden" name="id" value="{$info['id']|default=''}"/>
      <input class="form-control" name="owner_name" id='oname' value="" type="hidden">
        {include file="layout/edit_btn_group"/}
        
      </div>
       
      </div>
</form> 

<script>
   $(function(){
        
        $('.date').datetimepicker({
            format: 'yyyy-mm-dd',
            language:"zh-CN",
            minView:2,
            autoclose:true,

        });   
$('.date').datetimepicker('update', new Date());

$('#ocode').change(function(){
  var oldstr=$("#ocode option:selected").text();
  var str=oldstr.substring(0,oldstr.indexOf(':'));
  $("#oname").attr('value',str);
});

});
</script>

